home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / OpenGL 1.0 SDK / Source / Libraries / aux / shapes.c < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-18  |  3.0 KB  |  134 lines  |  [TEXT/CWIE]

  1. #include <math.h>
  2.  
  3. #include "tk.h"
  4. #include "aux.h"
  5.  
  6. /*  Render wire frame or solid sphere.  If no display list with
  7.  *  the current model size exists, create a new display list.
  8.  */
  9. void auxWireSphere(GLdouble radius)
  10. {
  11.     tkWireSphere(0, radius);
  12. }
  13.  
  14. void auxSolidSphere(GLdouble radius)
  15. {
  16.     tkSolidSphere(0, radius);
  17. }
  18.  
  19. /*  Render wire frame or solid cube.  If no display list with
  20.  *  the current model size exists, create a new display list.
  21.  */
  22. void auxWireCube(GLdouble size)
  23. {
  24.     tkWireCube(0, size);
  25. }
  26.  
  27. void auxSolidCube(GLdouble size)
  28. {
  29.     tkSolidCube(0, size);
  30. }
  31.  
  32. /*  Render wire frame or solid cube.  If no display list with
  33.  *  the current model size exists, create a new display list.
  34.  */
  35. void auxWireBox(GLdouble width, GLdouble height, GLdouble depth)
  36. {
  37.     tkWireBox(0, width, height, depth);
  38. }
  39.  
  40. void auxSolidBox(GLdouble width, GLdouble height, GLdouble depth)
  41. {
  42.     tkSolidBox(0, width, height, depth);
  43. }
  44.  
  45. /*  Render wire frame or solid tori.  If no display list with
  46.  *  the current model size exists, create a new display list.
  47.  */
  48. void auxWireTorus(GLdouble innerRadius, GLdouble outerRadius)
  49. {
  50.     tkWireTorus(0, innerRadius, outerRadius);
  51. }
  52.  
  53. void auxSolidTorus(GLdouble innerRadius, GLdouble outerRadius)
  54. {
  55.     tkSolidTorus(0, innerRadius, outerRadius);
  56. }
  57.  
  58. /*  Render wire frame or solid cylinders.  If no display list with
  59.  *  the current model size exists, create a new display list.
  60.  */
  61. void auxWireCylinder(GLdouble radius, GLdouble height)
  62. {
  63.     tkWireCylinder(0, radius, height);
  64. }
  65.  
  66. void auxSolidCylinder(GLdouble radius, GLdouble height)
  67. {
  68.     tkSolidCylinder(0, radius, height);
  69. }
  70.  
  71. /*  Render wire frame or solid icosahedra.  If no display list with
  72.  *  the current model size exists, create a new display list.
  73.  */
  74. void auxWireIcosahedron(GLdouble radius)
  75. {
  76.     tkWireIcosahedron(0, radius);
  77. }
  78.  
  79. void auxSolidIcosahedron(GLdouble radius)
  80. {
  81.     tkSolidIcosahedron(0, radius);
  82. }
  83.  
  84. /*  Render wire frame or solid octahedra.  If no display list with
  85.  *  the current model size exists, create a new display list.
  86.  */
  87. void auxWireOctahedron(GLdouble radius)
  88. {
  89.     tkWireOctahedron(0, radius);
  90. }
  91.  
  92. void auxSolidOctahedron(GLdouble radius)
  93. {
  94.     tkSolidOctahedron(0, radius);
  95. }
  96.  
  97. /*  Render wire frame or solid tetrahedra.  If no display list with
  98.  *  the current model size exists, create a new display list.
  99.  */
  100. void auxWireTetrahedron(GLdouble radius)
  101. {
  102.     tkWireTetrahedron(0, radius);
  103. }
  104.  
  105. void auxSolidTetrahedron(GLdouble radius)
  106. {
  107.     tkSolidTetrahedron(0, radius);
  108. }
  109.  
  110. /*  Render wire frame or solid dodecahedra.  If no display list with
  111.  *  the current model size exists, create a new display list.
  112.  */
  113. void auxWireDodecahedron(GLdouble radius)
  114. {
  115.     tkWireDodecahedron(0, radius);
  116. }
  117.  
  118. void auxSolidDodecahedron(GLdouble radius)
  119. {
  120.     tkSolidDodecahedron(0, radius);
  121. }
  122.  
  123. /*  Render wire frame or solid cones.  If no display list with
  124.  *  the current model size exists, create a new display list.
  125.  */
  126. void auxWireCone(GLdouble base, GLdouble height)
  127. {
  128.     tkWireCone(0, base, height);
  129. }
  130.  
  131. void auxSolidCone(GLdouble base, GLdouble height)
  132. {
  133.     tkSolidCone(0, base, height);
  134. }